<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>index</title>
</head>
<body>
 <div id="nav" class="nav-pcc">
 </div>
</body>
</html>
<script>
    const data = [
        {title:'首页',url:'/index.html'},
        {title:'新闻',url:'/a/a.html',children:[{title:'娱乐新闻',url:'/a/a-1.html'},{title:'国际新闻',url:''},{title:'八卦',url:''}]},
        {title:'统计',url:'/b.html',children:[{title:'科学统计',url:''},{title:'大数据',url:''}]},
        {title:'个人中心',url:'/c.html'}
    ]
    layui.config({
        base: '../js/' 
    }).extend({
        NHighlight: 'NHighlight' 
    });
        layui.use(['NHighlight'],function(){
        var NHighlight = layui.NHighlight
        NHighlight.init({
            elemId:'#nav',
            data:data,
            // themeColor:'#555',   //主题颜色 ，默认#4395ff
            // themeStyle:'backdrop',          //主题风格 ，边框或背景色 backdrop，默认边框 border
            // hoverBool:true       //是否有hover效果 ,默认有
        })
    
    });
</script>

